////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
#ifndef BINARY_FILE_H
#define BINARY_FILE_H

#include "irrTypes.h"
#include "IReadFile.h"


class CBinaryFile : public irr::io::IReadFile
{
	public:
	CBinaryFile(const wchar_t* fileName);
	CBinaryFile(const char* fileName);

	virtual ~CBinaryFile(void);

	inline irr::s8	ReadS8()	{ irr::s8  val; Read(&val, sizeof(irr::s8));	return val; }
	inline irr::s16	ReadS16()	{ irr::s16 val; Read(&val, sizeof(irr::s16)); return val; }
	inline irr::s32	ReadS32()	{ irr::s32 val; Read(&val, sizeof(irr::s32)); return val; }

	inline irr::u8	ReadU8()	{ irr::u8  val; Read(&val, sizeof(irr::u8));	return val; }
	inline irr::u16	ReadU16()	{ irr::u16 val; Read(&val, sizeof(irr::u16)); return val; }
	inline irr::u32	ReadU32()	{ irr::u32 val; Read(&val, sizeof(irr::u32)); return val; }

	inline irr::f32	ReadF32()	{ irr::f32 val; Read(&val, sizeof(irr::f32)); return val; }

	irr::s32	Read(void *out_pData, irr::u32 in_nSize) { return read (out_pData , in_nSize) ; }
};
#endif //BINARY_FILE_H